package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * StoreGoodsPic entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_STORE_GOODS_PIC", schema = "MXZ")
public class StoreGoodsPic extends Entity implements java.io.Serializable {

	// Fields

	private Long picId;
	private StoreGoods storeGoods;
	private String pic;

	// Constructors

	/** default constructor */
	public StoreGoodsPic() {
	}

	/** full constructor */
	public StoreGoodsPic(StoreGoods storeGoods, String pic) {
		this.storeGoods = storeGoods;
		this.pic = pic;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_STORE_GOODS_PIC")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "PIC_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getPicId() {
		return this.picId;
	}

	public void setPicId(Long picId) {
		this.picId = picId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STORE_GOODS_ID", nullable = false)
	public StoreGoods getStoreGoods() {
		return this.storeGoods;
	}

	public void setStoreGoods(StoreGoods storeGoods) {
		this.storeGoods = storeGoods;
	}

	@Column(name = "PIC", nullable = false, length = 100)
	public String getPic() {
		return this.pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

}